/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: PaymentContext
 * Author:   zhouheng
 * Date:     2019/5/15 9:15
 * Description: 支付上下文
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.star.pay.service.core.processor.context;

import com.star.pay.service.core.common.PayChannelEnum;
import com.star.pay.service.core.common.PaymentResponseEnum;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

/**
 * 〈一句话功能简述〉<br> 
 * 〈支付上下文〉
 *
 * @author zhouheng
 * @create 2019/5/15
 * @since 1.0.0
 */
@Data
@ToString
public class PaymentContext implements Serializable{
    private static final long serialVersionUID = -7194961610487256111L;

    private PayChannelEnum payChannelEnum; //支付渠道

    private int resCode;

    private String msg;

    public void setResCode(PaymentResponseEnum paymentResponseEnum, String desc){
        this.resCode = paymentResponseEnum.getCode();
        this.msg = paymentResponseEnum.getMsg(desc);
    }
}